﻿<?xml version="1.0" encoding="utf-8" ?>
<Page xmlns="http://www.baojiansoft.com/schemas/dynamicpage" ObjectId="UserManagement" Type="BaoJianSoft.Platform.Web.DynamicPage.UserManagement, BaoJianSoft.Platform">
	<Title>$Domain.Text$ $Resources.Membership.User, BaoJianSoft.Web$ $Resources.Membership.Management, BaoJianSoft.Web$</Title>
	<PermissionValue>$Domain.Value$.UserManagement</PermissionValue>
	<Panels>
		<QueryPanel Id="$Domain.Value$" HeaderText="$Resources.Membership.Query, BaoJianSoft.Web$ $Domain.Text$ $Resources.Membership.User, BaoJianSoft.Web$">
			<TextBox FieldName="UserName" Label="$Resources.Membership.User_Name, BaoJianSoft.Web$: " />
			<TextBox FieldName="DisplayName" Label="$Resources.Membership.User_DisplayName, BaoJianSoft.Web$: " />
			<CheckBoxGroup FieldName="Membership.IsApproved" FieldValueType="System.Boolean" Label="$Resources.Membership.User_Approved, BaoJianSoft.Web$: " Occupation="1">
				<Item Text="&lt;span style='color:green'&gt;$Resources.Membership.Yes, BaoJianSoft.Web$&lt;/span&gt;" Value="true" Checked="true" />
				<Item Text="&lt;span style='color:red'&gt;$Resources.Membership.No, BaoJianSoft.Web$&lt;/span&gt;" Value="false" />
			</CheckBoxGroup>
		</QueryPanel>
		
		<ButtonPanel Id="$Domain.Value$" ButtonAlignment="Left">
			<Button CommandArgument="New" Type="NewImage" ToolTip="$Resources.Membership.Add, BaoJianSoft.Web$" />
		</ButtonPanel>
		
		<GridViewPanel Id="$Domain.Value$"
			HeaderText="$Resources.Membership.QueryResults, BaoJianSoft.Web$"
			EntityName="$Domain.Text$ $Resources.Membership.User, BaoJianSoft.Web$"
			EnabledCheckBoxField="true"
			PageSize="25"
			PrimaryKeyFieldName="UserId"
			DefaultSortField="UserName"
			DefaultSortDirection="ASC">
			<ViewButton />
			<EditButton />
			<DeleteButton />
			<Fields>
				<Field FieldName="UserName" HeaderText="$Resources.Membership.User_Name, BaoJianSoft.Web$" />
				<Field FieldName="DisplayName" HeaderText="$Resources.Membership.User_DisplayName, BaoJianSoft.Web$" />
				<Field FieldName="OrganizationId" HeaderText="$Resources.Membership.Organization, BaoJianSoft.Web$" SortingFieldName="Organization.OrganizationName">
					<Transform-Callback Type="BaoJianSoft.Platform.Web.DynamicPage.GridViewFieldValueTransformCallback.ShowOrganizationName, BaoJianSoft.Platform"/>
				</Field>
				<Field FieldName="UserId" HeaderText="$Resources.Membership.Role, BaoJianSoft.Web$">
					<Transform-Callback Type="BaoJianSoft.Platform.Web.DynamicPage.GridViewFieldValueTransformCallback.ShowUserInRoles, BaoJianSoft.Platform"/>
				</Field>
				<Field FieldName="MobilePin" HeaderText="$Resources.Membership.Mobile, BaoJianSoft.Web$" SortingFieldName="Membership.MobilePIN" />
				<Field FieldName="Email" HeaderText="$Resources.Membership.Email, BaoJianSoft.Web$" SortingFieldName="Membership.Email" Hidden="true" />
				<Field FieldName="IsApproved" HeaderText="$Resources.Membership.User_Approved, BaoJianSoft.Web$" SortingFieldName="Membership.IsApproved">
					<Transform-Switch>
						<Case Value="True">&lt;span style='color:green'&gt;$Resources.Membership.Yes, BaoJianSoft.Web$&lt;/span&gt;</Case>
						<Case Value="False">&lt;span style='color:red'&gt;$Resources.Membership.No, BaoJianSoft.Web$&lt;/span&gt;</Case>
					</Transform-Switch>
				</Field>
				<Field FieldName="IsLockedOut" HeaderText="$Resources.Membership.User_LockStatus, BaoJianSoft.Web$" SortingFieldName="Membership.IsLockedOut">
					<Transform-Switch>
						<Case Value="True">&lt;span style='color:green'&gt;$Resources.Membership.Yes, BaoJianSoft.Web$&lt;/span&gt;</Case>
						<Case Value="False">&lt;span style='color:red'&gt;$Resources.Membership.No, BaoJianSoft.Web$&lt;/span&gt;</Case>
					</Transform-Switch>
				</Field>
				<Field FieldName="LastUpdatedDate" HeaderText="$Resources.Membership.ModifiedOn, BaoJianSoft.Web$" Align="Center" Width="150" />
				<RowView FieldName="Comment" />
			</Fields>
		</GridViewPanel>
		
		<DetailPanel Id="$Domain.Value$" HeaderText="$Domain.Text$ $Resources.Membership.User, BaoJianSoft.Web$ $Resources.Membership.Profile, BaoJianSoft.Web$" ShowMessageAfterSavedSuccessfully="false">
			<Type>BaoJianSoft.Platform.Web.DynamicPage.UserDetailPanel, BaoJianSoft.Platform</Type>
			<SkinPath>~/Templates/Platform/User.ascx</SkinPath>
			<SaveButton />
			<CancelButton />
		</DetailPanel>
	</Panels>
</Page>